feat: add campaign mode for multi-stage plugin modernization#1707
Open
Fikri-20 wants to merge 8 commits intojenkins-infra:mainfrom
Open
feat: add campaign mode for multi-stage plugin modernization#1707Fikri-20 wants to merge 8 commits intojenkins-infra:mainfrom
Fikri-20 wants to merge 8 commits intojenkins-infra:mainfrom
Conversation
…erters Move recipe name resolution and local plugin path resolution out of the picocli converters into standalone core utilities so they can be reused by campaign mode without depending on the CLI layer.
Add Jackson-mapped classes for campaign input (definition, stages, plugin sources, filters, execution settings, output config) and for the structured JSON report (campaign, per-plugin, per-stage).
Validates that at least one plugin source is declared, stages are non-empty, all recipe names resolve, and topPlugins is positive.
Resolves plugins from names, file, localPaths, and topPlugins sources. Sources are combined and deduplicated. Filters on install count, health score, deprecation, and adoption status are applied before returning the final list. Throws if no plugins survive the filters.
CampaignService orchestrates per-plugin stage execution using a fixed thread pool. Each stage reuses the local workspace from the previous one. Stops on first failure per plugin unless continueOnFailure is set. Writes the JSON report at the end. DefaultCampaignModernizerRunner delegates each stage to the existing PluginModernizer engine.
Register CampaignCommand as a subcommand in Main. Bind CampaignModernizerRunner to DefaultCampaignModernizerRunner in GuiceModule. Add testCampaignOnLocalPlugin integration test.
1875981 to
6754e9a
Compare
Contributor
Author
|
@jonesbusy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tool today runs one recipe, one invocation. If you want to modernize a plugin properly - Dependabot, security scan, parent POM upgrade - that's three separate runs, three separate outputs, no connection between them.
Campaign mode fixes that. One YAML file, one run, one report.
Adds a
campaignsubcommand. It reads a YAML file that defines plugin sources, an ordered list of recipe stages, and execution settings. Each stage runs on the local workspace left by the previous one - no re-clone between stages. Always runs in dry-run mode: no commits, forks, or PRs are created.Plugin sources can be combined: explicit names, a file, local paths, or the top N by install count. Filters on health score, install count, and deprecation status narrow the set before execution begins.
Testing done
Ran against

permissive-script-security(health score 71, no.github/dir):Submitter checklist